input,
select,
textarea {
    box-sizing: border-box;
    margin: 0;
    border-radius: 0.15rem;
    font: inherit;
    color: inherit;
}

/*
 * Address inconsistent `text-transform` inheritance which is only inherit in Firefox
 */
select {
    text-transform: none;
}

/*
 * 1. Correct `font` properties not being inherited.
 * 2. Don't inherit the `font-weight` and use `bold` instead.
 * NOTE: Both declarations don't work in Chrome, Safari and Opera.
 */
optgroup {
    font: inherit;
    font-weight: bold;
}

/*
 * Removes inner padding and border in Firefox 4+.
 */
input::-moz-focus-inner {
    border: 0;
    padding: 0;
}

/*
 * Removes excess padding in IE 8/9/10.
 */
input[type="checkbox"],
input[type="radio"] {
    padding: 0;
}

/*
 * Improves consistency of cursor style for clickable elements
 */
input[type="checkbox"]:not(:disabled),
input[type="radio"]:not(:disabled) {
    cursor: pointer;
}

/*
 * Remove default style in iOS.
 */
textarea,
input:not([type]),
input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="number"],
input[type="datetime"] {
    -webkit-appearance: none;
}

/*
 * Remove inner padding and search cancel button in Chrome, Safari and Opera on OS X.
 */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
}

/*
 * Fix the cursor style for Chrome's increment/decrement buttons. For certain
 * `font-size` values of the `input`, it causes the cursor style of the
 * decrement button to change from `default` to `text`.
 */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    height: auto;
}

/*
 * Define consistent border, margin, and padding.
 */
fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

/*
 * 1. Remove default vertical scrollbar in IE 8/9/10/11.
 * 2. Improve readability and alignment in all browsers.
 */
textarea {
    /* 1 */
    overflow: auto;
    /* 2 */
    vertical-align: top;
}

/*
 * Removes placeholder transparency in Firefox.
 */
::-moz-placeholder {
    opacity: 1;
}

/*
 * Removes `box-shadow` for invalid controls in Firefox.
 */
:invalid {
    box-shadow: none;
}

/*
 * Vertical alignment
 */
input:not([type="radio"]):not([type="checkbox"]),
select {
    vertical-align: middle;
}

/* Style
 ========================================================================== */
/*
 * Remove margin from the last-child
 */
//> :last-child {
//  margin-bottom: 0;
//}

/*
 * Controls
 * Except for `range`, `radio`, `checkbox`, `file`, `submit`, `reset`, `button` and `image`
 * 1. Must be `height` because `min-height` is not working in OSX
 * 2. Responsiveness: Sets a maximum width relative to the parent to scale on narrower viewports
 * 3. Vertical `padding` needed for `select` elements in Firefox
 * 4. Style
 */
select,
textarea,
input:not([type]),
input[type="text"],
input[type="password"],
input[type="datetime"],
input[type="datetime-local"],
input[type="date"],
input[type="month"],
input[type="time"],
input[type="week"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="color"] {
    line-height: 1;
    max-width: 100%;
    padding: 0.2rem 0.3rem;
    border: 0.05rem solid var(--color-body-line);
    background: var(--color-input-light-bg);
    color: var(--color-text);
    //transition: border-color .2s, background .2s;
}

select:focus,
textarea:focus,
input:not([type]):focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="time"]:focus,
input[type="week"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="color"]:focus {
    border-color: var(--color-primary-light);
    outline: 0;
    color: var(--color-text);
}

select:disabled,
textarea:disabled,
input:not([type]):disabled,
input[type="text"]:disabled,
input[type="password"]:disabled,
input[type="datetime"]:disabled,
input[type="datetime-local"]:disabled,
input[type="date"]:disabled,
input[type="month"]:disabled,
input[type="time"]:disabled,
input[type="week"]:disabled,
input[type="number"]:disabled,
input[type="email"]:disabled,
input[type="url"]:disabled,
input[type="search"]:disabled,
input[type="tel"]:disabled,
input[type="color"]:disabled {
    border-color: var(--color-body-line);
    background-color: #F5F7FA;
    color: #C4CFDB;
}

textarea:read-only,
input[type="text"]:read-only,
input[type="password"]:read-only,
input[type="datetime"]:read-only,
input[type="datetime-local"]:read-only,
input[type="date"]:read-only,
input[type="month"]:read-only,
input[type="time"]:read-only,
input[type="week"]:read-only,
input[type="number"]:read-only,
input[type="email"]:read-only,
input[type="url"]:read-only,
input[type="search"]:read-only,
input[type="tel"]:read-only,
input[type="color"]:read-only {
    border-color: #DDDDDD;
    background-color: #F5F7FA;
    color: #666666;
}

/*
 * Placeholder
 */
:-ms-input-placeholder {
    color: #C4CFDB !important;
}

::-moz-placeholder {
    color: #C4CFDB;
}

::-webkit-input-placeholder {
    color: #C4CFDB;
}

:disabled:-ms-input-placeholder {
    color: #C4CFDB !important;
}

:disabled::-moz-placeholder {
    color: #C4CFDB;
}

:disabled::-webkit-input-placeholder {
    color: #C4CFDB;
}

/*
 * Legend
 * 1. Behave like block element
 * 2. Correct `color` not being inherited in IE 8/9/10/11.
 * 3. Remove padding
 * 4. `margin-bottom` is not working in Safari and Opera.
 *    Using `padding` and :after instead to create the border
 * 5. Style
 */
legend {
    /* 1 */
    width: 100%;
    /* 2 */
    border: 0;
    /* 3 */
    padding: 0;
    /* 4 */
    padding-bottom: 0.75rem;
    /* 5 */
    font-size: 0.9rem;
    line-height: 1.5rem;
}

/*
 * 1. Fixes IE9
 */
legend:after {
    content: "";
    display: block;
    border-bottom: 0.05rem solid #dddddd;
    width: 100%;
}

/* Size modifiers
 * Higher specificity needed to override defaults
 ========================================================================== */
select {
    &.success {
        border-color: var(--color-success);
        color: var(--color-success);
    }

    &.warning {
        border-color: var(--color-warning);
        color: var(--color-warning);
    }

    &.danger {
        border-color: var(--color-danger);
        color: var(--color-danger);
    }
}

select.form,
textarea.form,
input[type].form,
input:not([type]).form {
    height: 1.6rem;
    // padding: 0.15rem 0.15rem;
    font-size: 0.65rem;
}

textarea.form-lg,
input[type].form-lg,
input:not([type]).form-lg {
    height: 2rem;
    padding: 0.6rem 0.3rem;
    font-size: 0.8rem;
}


select.form-lg{
    height: 2rem;
    font-size: 0.8rem;
}

select.form-sm,
textarea.form-sm,
input[type].form-sm,
input:not([type]).form-sm {
    height: 1.4rem;
    padding: 0.15rem 0.15rem;
    font-size: 0.5rem;
}

/* Reset height
 * Must be after size modifiers
 ========================================================================== */
textarea,
select[multiple],
select[size] {
    height: auto;
}

textarea::-webkit-input-placeholder, input::-webkit-input-placeholder {
    color: var(--color-input-placeholder);
}

textarea::-webkit-input-placeholder, input:-moz-placeholder {
    color: var(--color-input-placeholder);
}

textarea::-webkit-input-placeholder, input::-moz-placeholder {
    color: var(--color-input-placeholder);
}

textarea::-webkit-input-placeholder, input:-ms-input-placeholder {
    color: var(--color-input-placeholder);
}
